package com.example.demo5.info.controller;

import com.example.demo5.info.mapper.UserMapper;
import com.example.demo5.info.pojo.Userlist;
import com.example.demo5.info.service.UserlistService;
import com.example.demo5.result.AjaxResult;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/userlist")
public class UserlistController {
    @Autowired
    private UserMapper userMapper;
    @Resource
    private UserlistService userlistService;

    @GetMapping("/list")
    //分页列表 page页码  size展示数 name 搜索条件
    public AjaxResult getList (@Param("page") int page, @Param("size") int size, @Param("name") String userName){

      return  userlistService.getList(page,size,userName);

    };
}
